﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for ServiceManager
/// </summary>
public class ServiceManager
{
    public QQService QQService { get; set; }
    public AppleService AppleService { get; set; }
    public WeatherService WeatherService { get; set; }
    public StockService StockService { get; set; }

    public static ServiceManager LoadFromFile(string fileName)
    {
        DataManager dataMan = new DataManager(fileName, typeof(ServiceManager));
        ServiceManager data = dataMan.LoadData() as ServiceManager;
        if (data == null)
        {
            return new ServiceManager();
        }
        return data;
    }
}